Implement backdrop for Quartz
authorMatthias Clasen <mclasen@redhat.com>
Wed, 1 Mar 2017 01:45:18 +0000 (20:45 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 1 Mar 2017 16:47:18 +0000 (11:47 -0500)
We need to send window state change events to make GTK+
pick up on focus changed for backdrop.

https://bugzilla.gnome.org/show_bug.cgi?id=779392

gdk/quartz/GdkQuartzNSWindow.c

index 94acc90b8f1c69fa41ab4a2b78302cf09f9205b3..cafabf452281b47ab091e751c425aa96babc3a4e 100644 (file)
@@ -74,6 +74,7 @@
 {
   GdkWindow *window = [[self contentView] gdkWindow];
 
+  gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
   _gdk_quartz_events_update_focus_window (window, TRUE);
 }
 
@@ -82,6 +83,7 @@
   GdkWindow *window = [[self contentView] gdkWindow];
 
   _gdk_quartz_events_update_focus_window (window, FALSE);
+  gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
 }
 
 -(void)windowDidBecomeMain:(NSNotification *)aNotification